from selenium import webdriver
from selenium.webdriver.common.by import By

# driver = webdriver.Chrome()
# driver.get('https://www.baidu.com')
# # print(driver.find_element(By.XPATH, "//a[contains(text(), 'hao')]").get_attribute('outerHTML'))
# # driver.quit()
# print(driver.find_element(By.XPATH, "//*[contains(@id,('t')]"))
# driver.quit()
driver = webdriver.Chrome()
driver.get('https://www.baidu.com')
# hao = driver.find_element(By.XPATH, "//*[contains(@class, 's-bri c-font-normal c-color-t')]")
# print(hao.get_attribute('outerHTML'))
# driver.quit()
id =driver.find_element(By.XPATH, "//span[@name='tj_settingicon' and @id='s-usersetting-top']")
print(id.get_attribute('outerHTML'))
driver.quit()


